import React from 'react'
import "./Header.less";
import { withRouter } from "react-router-dom"

 function Header(props) {
   console.log(props);
  let {text,back,register} = props;
  return (
    <div className='header'>
          {back? <span className='back' onClick={()=>props.history.go(-1)}>返回</span>:null}
          <div className='text'>{text}</div>
          {register ? <span className='register'>注册</span>:null}
      </div>
  )
}

export default withRouter(Header);

